#include "config.h"
#include "sys_tim.h"
#include "task_handler.h"
#include "watch_dog.h"
#include "uart_drv.h"
#include "beep_drv.h"
#include "button_drv.h"
#include "gn1640.h"
#include "display_task.h"

void main(void)
{
    System_Init();        
    App_Task_Handler();
    while(1)
    {
        ;
    }
}

void System_Init(void)
{
	WTST = 0;	    
    EAXSFR();       
    CKCON = 0;      
    Beep_Init();
    Timer_config();   
    UART_Init();    
    Button_Init();  
    GN1640_Init();
    DisplayTaskInit();
    WDT_Init();        
    EA = 1;
    // P1_MODE_OUT_PP(GPIO_Pin_6);
    // P16 = 0;
}
